package com.aaa.mrcai.service.impl;

import com.aaa.mrcai.mapper.DetailMapper;
import com.aaa.mrcai.pojo.entity.StoreGoods;
import com.aaa.mrcai.result.AjaxResult;
import com.aaa.mrcai.service.DetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * TODO
 *
 * @author 惠普
 * @date 2021/12/15  22:10
 */
@Service
public class DetailServiceImpl implements DetailService {

    @Autowired
    private DetailMapper detailMapper;

    @Override
    public AjaxResult getDetail(int id) {
        StoreGoods detail = detailMapper.getDetail(id);
        if(detail!=null){
            return AjaxResult.success(detail);
        }else {
            return AjaxResult.defeated();
        }
    }
}
